package com.maimao.order.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.maimao.model.order.OrderShop;
import com.maimao.model.order.es.EsOrderShop;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author MaoLin Wang
 * @date 2021/1/18 5:46 下午
 */
@Mapper
public interface OrderShopMapper extends BaseMapper<OrderShop> {

    int updateStatus(@Param("orderId") Long orderId, @Param("status") Integer status);

    List<Long> selectCouponIdsByOrderId(@Param("orderId") Long orderId);

    List<OrderShop> selectIdByOrderId(@Param("orderId") Long orderId);

    List<OrderShop> selectByOrderId(@Param("orderId") Long orderId);

    List<EsOrderShop> selectEsByOrderId(@Param("orderId") Long orderId);

    int updateDeleted(@Param("id") Long orderShopId, @Param("deleted") Integer deleted);

    int updateStatusByShopId(@Param("orderShopId") Long orderShopId, @Param("status") Integer status);
//    List<OrderShop> selectSimpleByOrderId(@Param("orderId") Long orderId);
}
